Competitive analysis of online revenue management with two hierarchical resources and multiple fare classes

Resource allocation problem is one of key issues in the field of revenue management. The traditional models usually rely on some restrictive assumptions about demand information or arrival process, which is sometimes out of line with reality. To overcome this shortcoming, the method of competitive analysis of online algorithms, which eliminates the need for the assumptions on demand and arrivals, is adopted to deal with the quantity-based revenue management problem. The current model in this paper considers two downgrade compatible levels of resources. Given the capacities and fares of both levels of resources, the objective is to accept appropriate customers and assign them to appropriate resources so as to maximize revenues. Compared with the existing literature, this paper generalizes the concerned resource allocation problem by considering multiple fares for each level of resources. From the perspective of online algorithms and competitive analysis, both an upper bound and an optimal online strategy are derived in this paper.


Introduction
In the field of revenue management (RM), one of the key issues is to deal with the quantitybased single-leg problem, where the decision maker allocates inventory of a kind of resource to a demand stream and each customer in the stream has a requested fare drawn from a given set of fare classes [1]. For example, given a flight with 100 available seats and three fare classes, e.g. $1000, $800, and $500, the airline has to decide how many seats to be allocated to different fare classes in order to maximize revenues. If the demand of each fare class is known in advance, the resource allocation problem is easy to solve, i.e., allocating seats to higher fare class as far as possible. Since the demand information is usually uncertain in practice, the majority of successful RM implementations rely heavily on accurate demand forecasting [2,3]. Meanwhile, the traditional theoretical models often rely on some restrictive and unrealistic assumptions about demand information or arrival process such as independence and stationarity [4].
However, in the case of short life products or situations where demand history is not necessarily available, to obtain accurate characterization of demand is a challenge [5,6]. Even in the fields of both airlines and hotels, where the application of RM techniques is the most non-overlapping intervals [14], a stochastic process [15], discrete time Markov Decision Process [16], or demand information on the choice behavior [17]. In practice, it is probably difficult to meet these assumptions on demand. Therefore, we need more robust approaches which do not rely heavily on demand information to deal with the quantity-based RM problem.
In the new stream of research, the works of [18][19][20] are the most related to our study, all of which adopt the approach of competitive analysis of online algorithms. Ball and Queyranne, to the best of our knowledge, were the first to deal with the single-leg resource allocation RM problem from the perspective of online algorithms and competitive analysis [18]. They defined the lower bounds on the best-possible algorithmic performance and designed optimal nested protection-level policies whose competitive ratios match the lower bounds. In their model, there is no any assumption on demand or arrivals. Also from the perspective of competitive analysis of online algorithms, Lan et al. studied the classical multiple fare single-leg RM problem with limited demand information where the decision maker only knows the lower and upper bounds of demand for each fare class [19]. That is, the work of [19] is more general than that of [18] by assuming the availability of limited demand information. The competitive analysis of online algorithms has also been applied for other single-leg RM problem under various situations in the literature [21][22][23]. All of these studies assume that the resource is non-hierarchical, which is sometimes out of line with reality. Like the example in the field of airlines, the quantity-based RM problem dealing with compatible hierarchical resources is very common. To overcome this shortcoming, in this paper we consider the single-leg RM problem with two levels of resources, which are downgrade compatible; that is the resource of high level can be used as low level, but the resource of low level cannot be used as high level. Recently, Ni et al. proposed an optimal online strategy for the simplest problem with two levels of resources, in which there is only one fare class for each level of resources [20]. However, taking the field of airlines as an example, there usually are multiple fare classes even for the same level of resources. In order to be more realistic, we further extend the work of [20] by considering more than one fare class for the same level of resources. It is worth noting that our model will degenerate to the Multiple-Fare Classes problem studied in [18] when there is only one level of resources available. Besides, the current model will degenerate to the 2-level-2-class problem studied in [20] if there is only one fare class for each level of resources.
The rest of this paper is organized as follows. In the following section, we introduce the problem and describe our approach. Next, an upper bound and an optimal online strategy are presented from the perspective of online algorithms and competitive analysis. Finally, applications and future directions are discussed.

Problem definitions
Consider the problem of a firm having two levels of resources, denoted by R 1 and R 2 , to provide a kind of service for heterogeneous customers. Suppose that resource R i has a capacity of L i (i = 1, 2) where L i is an integer, and each customer only needs one unit capacity of resource. Although both levels of resources can satisfy customers' basic need, we assume that R 2 serves customers better or more comfortably than R 1 ; that is, the level of R 2 is higher than R 1 . As described in the airline scenario, the firm indeed sells both levels of resources at different discounts based on market segmentation and predetermines the fare of each class. Let {f 1 , f 2 , . . ., f m } be the set of all fares and f 1 < f 2 < � � � < f m . Without loss of generality, let f k (1 � k < m) be the full fare of unit R 1 and f m be the full fare of unit R 2 . Facing a request of customer with reservation price p for unit resource, if f i � p < f i+1 for some i � k, the firm can charge at most f i no matter which level of resources, R 1 or R 2 , is assigned to this customer. While, if f i � p < f i+1 for some i � k + 1 (defining f m+1 = +1 for completeness), the firm has two choices, assigning the customer to R 2 charging f i or assigning the customer to R 1 charging f k . According to their reservation prices, customers are also divided into m classes, denoted by class C i (i = 1, 2, . . ., m), and the reservation price of customers of class C i is within the range of [f i , f i+1 ). Given the capacity of each level of resources, the objective of the firm is to choose the most profitable customers and assign them to the right resources to maximize the resulting revenue. All of the main symbols that are used in the resource allocation model are listed in Table 1.
If the demand information is known in advance, then it is an offline problem and there is an intuitional revenue-maximization strategy, i.e., assigning customers with higher reservation price to higher level of resources as far as possible. Namely, an optimal offline strategy first assigns customers of class C m to resource R 2 and then to resource R 1 until either all customers of this kind are assigned or all resources are used. If there are some resources available after accepting all customers of class C m , then accept and assign customers of class C m−1 first to R 2 as far as possible and then to R 1 , and so forth. This continues until all customers are assigned or all resources are used.
As mentioned in the introduction, we focus on an online version of the RM problem, wherein customers ask for the service one at a time and the decision on whether to accept the request as well as assigning it to which level of resources has to be made irrecoverably on its arrival without the information of further customers. For a revenue-maximization problem, the theoretical performance of an online strategy is measured by the ratio between the objective revenue achieved by the online strategy and the revenue achieved by an optimal offline strategy, which is called competitive ratio in the literature. Let O A be the set of all possible input sequences to an online strategy A. For 8I 2 O A , let V A (I) be the objective revenue achieved by A facing input I and let V OPT (I) be the objective revenue achieved by an optimal offline strategy. The competitive ratio of A is defined as

Competitive analysis for the online RM problem
This section gives detailed competitive analysis for the online RM problem with two levels of resources and multiple fare classes. First, an online strategy is designed in the following, and then an upper bound for the proposed online RM problem is derived.

An online nested protection strategy
For notational convenience, let t = L 1 /L 2 be the ratio of the capacities and r i = f i /f i+1 be the ratio of the fares for 1 � i < m in the following. Virtually set r 0 = 0 and r m = 1. We define p the reservation price of customer for the resource. r i = f i /f i+1 the ratio of adjacent fares for 1 � i < m, specially, r 0 = 0 and r m = 1. https://doi.org/10.1371/journal.pone.0276530.t001 . Because 0 � r i < 1 and t > 0, the denominator is larger than 1 and obviously 0 < α < 1.

For customers of class
The following lemma can be derived from the definition of Θ j . Lemma 1 Given the definition of α and the values of Θ j as defined, That means part (1) is straightforward and independent of the specific value of α. The reasoning of part (2), however, is non-trival. Firstly, considering the part of By the definitions of Θ k+1 and Θ k , because of r m = 1, By the definition of Θ j for k + 2 � i � j � m, And thus, Now, we can derive the left side of the equation in part (2) as follows.

and we
can similarly derive the result of part (2) for j = k + 1. Thus, the proof of part (2) is completed, which gives us the lemma. Upon an arrival of any customer, denote by l i , l i1 , and l i2 the number of customers of class C i that have been accepted by the online strategy and been assigned to resource R 1 and resource R 2 , respectively. Let l i = l i1 = l i2 = 0 for 1 � i � m initially. Now, we present an online nested protection strategy, denoted by ONPS, for the problem as follows.
Online nested protection strategy ONPS. Upon an arrival of a customer of class C j with 1 � j � k, accept the customer's service request and assign the accepted customer to resource By the above description of strategy ONPS, it guarantees a reservation capacity for each class of customers, and all the reservation capacities are nested. More precisely, for the highest j (�k) classes of customers whose reservation prices are no more than f k , i.e. C k−j+1 , C k−j+2 , . . ., C k , strategy ONPS defines a protection reservation capacity equal to Θ k − Θ k−j . With a little difference, for the highest j (<m − k) classes of customers whose reservation prices are more than f k , i.e. C m−j+1 , C m−j+2 , . . ., C m , strategy ONPS defines a protection reservation capacity equal to L 2 − Θ m−j . In special, for the highest m − k classes of customers, i.e. C k+1 , C k+2 , . . ., C m , strategy ONPS defines a protection reservation capacity just equal to L 2 − (Θ k − L 1 ) = L 1 + L 2 − Θ k . Notice that, applying ONPS, only the higher class of customers can occupy the protection capacity reserved for the lower class. The lower class of customers cannot occupy the protection capacity reserved for the higher class.

Theorem 1 For the online quantity-based RM problem with two levels of resources and multiple fares, strategy ONPS has a competitive ratio of α.
Proof of Theorem 1. Given any customer input instance I, let l 0 i be the total number of customers of class C j for all j � i that are accepted by ONPS, and virtually set l 0 Because ONPS considers eligible resource from R 1 to R 2 (or, from R 2 to R 1 ) when assigning the accepted customers of class C j for all j � k (or, for all j > k), the definition of u implies that all the customers of class C j in instance I with u < j � m are accepted by ONPS and assigned to the right resources resulting in as much revenue as possible. Let V on and V opt be the total revenue obtained by ONPS and by an optimal offline strategy OPT facing instance I, respectively. According to the status of u, there are four cases as discussed below. Case 1. u = 0. This condition implies that all the customers in I are accepted by ONPS and assigned to the right resources from the above analysis, and thus V on = V opt . Case 2. 1 � u � k. For this case, let P be the total revenue of the accepted customers each of which is of a reservation price strictly larger than f u , and ϕ be the total number of these customers accepted by ONPS. We already know that strategy ONPS reserves a capacity of Θ k − Θ u for all customers of classes C u+1 , . . ., where the second inequality is due to Lemma 1. OPT at best accepts all the ϕ customers with revenue larger than f u as ONPS does, and accepts the rest L 1 + L 2 − ϕ customers with unit revenue at most f u , implying V opt � P + f u (L 1 + L 2 − ϕ), and thus V on In this case, P and ϕ are defined as the same with Case 2. Similarly, since ONPS reserves a capacity of L 1 + L 2 − Θ k for all customers of classes C k+1 , . . ., C m , and a capacity of L 2 − Θ u for all customers of classes C u+1 , . . ., it at best accepts all the ϕ customers with reservation price larger than f u and accepts the rest L 2 − ϕ customers with reservation price at most f u for resource R 2 . Each customer assigned to resource R 1 is of unit revenue at most f k . Therefore, V opt � P + f u (L 2 − ϕ) + f k L 1 , and thus For OPT, it at best gains a maximum revenue of V opt = f k L 1 + f m L 2 , and thus V on V opt � aðf k L 1 þf m L 2 Þ f k L 1 þf m L 2 ¼ a. Combining the four cases, the revenue achieved by strategy ONPS is always no less than α times of that achieved by an optimal strategy, which gives us the theorem.

An upper bound
In this section, we present an upper bound of competitive ratio for the online RM problem with two levels of resources and multiple fares as stated in Theorem 2, which implies that the online strategy ONPS proposed in the previous section is an optimal one. Theorem 2 For the online quantity-based RM problem with two levels of resources and multiple fares, any online strategy has a competitive ratio of at most α.
Proof of Theorem 2. In order to derive a bound on the best-possible performance for an online strategy for the problem, we use the following extreme instances I i (i = 1, . . ., m): in instance I i a sequence of i(L 1 + L 2 ) customers, namely, L 1 + L 2 customers of each class C 1 , C 2 , . . ., C i arrive in this order. The optimum revenues earned by an offline strategy OPT are For any online strategy ON, let x ON i be the number of customers of class C i accepted by ON when presented with instance I m . Note that ON has no way of knowing whether it is facing instance I i or some I j with j > i before it has seen the first i(L 1 + L 2 ) customers in the stated sequence. Therefore, for all 1 � j � i, ON will accept exactly x ON j customers of class C j when presented with instance . ., m, then strategy ON is equivalent to ONPS, which implies that the competitive ratio of ON is just α by Theorem 1. Otherwise, if there exists some x ON then there are two cases as discussed below according to the status of v.
In this case, to generate the worst algorithmic performance, the extreme instance I v will be presented for ON. Obviously, the revenue gained by ON facing I v is By Lemma 1 and the definition of ω i , The rest reasoning is similar to Case 1. Presenting the extreme instance I v+h+1 for ON, it is also that V ON ðI vþhþ1 Þ V OPT ðI vþhþ1 Þ < a in this case. Combining Case 1 and Case 2, it is always that V ON � αV OPT , which gives us Theorem 2.

Application discussion
In this section, we present a numerical example in the field of airlines to illustrate the results of our model and to discuss the application of the proposed theoretical model. In fact, our method and model can also be applied in other fields, such as hotel booking with heterogenous rooms and car rental with different classes of autos.
Consider an airline that provides potential passengers with 80 economy class seats and 20 business class seats, for one flight. The full fares of economy tickets and business tickets are predetermined equal to $1000 and $2000, respectively. Additionally, there are two discount fares of economy tickets respectively equal to $500 and $750, and there is only one discount fare equal to $1600 for business seats. Following the theoretical model setting, it is that L 1 = 80, L 2 = 20, and thus t = L 1 /L 2 = 4. Meanwhile, f 1 = $500, f 2 = $750, f 3 = $1000, f 4 = $1600, and f 5 = $2000. According to the definition of the proposed online strategy, we further have r 0 = 0, r 1 = 2/3, r 2 = 3/4, r 3 = 5/8, r 4 = 4/5, r 5 = 1, and thus α = 0.59, which means that any online seat allocation strategy cannot achieve a competitive ratio larger than 0.59 for this example.
In order to illustrate the results of our proposed model and online strategy, consider an extreme LBH customer arrivals stated as follows. In this LBH arriving process, a sequence of 100 customers of each class C 1 , C 2 , C 3 , C 4 , C 5 arrive in this order. Obviously, the optimal offline strategy with full information would only accept 100 customers of class C 5 and assign 20 of them to business seats charging f 5 . The rest 80 customers are assigned to economy seats at f 3 . The resulting maximum revenue is equal to V opt = 20f 5 + 80f 3 = $120000. For the same customer arriving sequence, the first-come-first-served strategy would accept 100 customers of class C 1 gaining $50000.
Following the online strategy ONPS proposed in our model, obviously Θ 1 = 59, Θ 2 = 79, Θ 3 = 93, Θ 4 = 18, and Θ 5 = 20. That is, for the highest business class C 5 , the proposed strategy ONPS defines a protection reservation capacity of 2 business seats. For the highest two business classes of customers, i.e. C 4 and C 5 , 7 business seats are reserved as the protection capacity. For the highest economy class C 3 , strategy ONPS defines a protection reservation capacity equal to 93-79 = 14. For the highest two economy class C 2 and C 3 , strategy ONPS defines a protection reservation capacity equal to 93-59 = 34. For the lowest class C 1 , ONPS sets a maximum number of accepted customers equal to 59. Therefore, facing the same instance, the proposed strategy ONPS will accept 59 customers of class C 1 and 20 customers of class C 2 , and assign them to economy seats. 14 customers of class C 3 will be accepted and 13 of them will be assigned to business seats. The strategy ONPS will also accept 5 customers of class C 4 and 2 customers of class C 5 , and assign them to business seats. The resulting revenue is equal to 59f 1 + 20f 2 + 14f 3 + 4f 4 + 2f 5 = $70500, which is more than that gained by the first-come-first-served strategy.
Obviously, the revenue gained by ONPS is 0.59 (= 70500/120000) times of that gained by an optimal offline strategy. Note that, the competitive ratio of the proposed strategy is just equal to α = 0.59, which means that the presented extreme LBH instance is one of the worst cases for strategy ONPS from the perspective of competitive analysis of online algorithms. In other words, the practical performance will be better when facing other customer arriving instances.
Notice that, there is an implicit assumption on customer's reservation price in our model. We assume that the decision maker knows the customer's reservation price when she/he arrives. For some firm, in fact, it might analyze the psychological expectation of customer and draw the reservation price using big data technology. Even in the case where the firm cannot know customer's reservation prices, our model can also be used to guide the decisions on how many resources to be sold at each fare, especially to set limits for lower fare classes and to reserve capacity for higher fare classes, like the applications of theoretical models implied in [18].

Conclusion
This paper studies an online revenue maximization problem of assigning heterogeneous customers to two levels of resources with capacity constraints. From the perspective of competitive analysis, an upper bound for this online revenue management problem is derived and an online strategy whose competitive ratio matches the upper bound is also proposed. The model proposed in this paper generalizes the 2-level-2-class problem studied in [20] by considering multiple fare classes for each level of resources, i.e., the strategy as well as the theoretical result will degenerate to that of [20] if k = 1 and m = 2 in the current model. Besides, it will degenerate to the single-leg-multiple-fare problem studied in [18] when there is only one level of resources available.
There are several directions for future research. First, it is interesting to study the general problem with more than two levels of resources. Second, it is valuable to investigate the scenario with limited downgrading for customers with high reservation price. Third, it is also interesting and challenging to consider resources allocation problem together with pricing decisions.